package elitech.vietnam.weatherfashion.dto;

import java.util.Date;

import com.google.gson.annotations.SerializedName;

import elitech.vietnam.weatherfashion.ultilities.Utilities;

public class ProductDTO {

	private int id;
	@SerializedName("id_post")
	private int postId;
	private String title;
	private String price;
	private String link;
	private String image;
	private int status;
	@SerializedName("create_day")
	private String createDayString;
	private Date createDate;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getPostId() {
		return postId;
	}

	public void setPostId(int postId) {
		this.postId = postId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Date getCreateDate() {
		if (createDate == null)
			createDate = Utilities.parseDateFromStringFormat(createDayString,
					"yyyy-MM-dd hh:mm:ss");

		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

}
